# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>

_realname=attrs
pkgbase=python-attrs
pkgname=("python-${_realname}")
pkgver=20.3.0
pkgrel=1
pkgdesc="Attributes without boilerplate."
arch=('any')
license=('MIT')
url="https://attrs.readthedocs.org/"
depends=('python')
makedepends=('python-setuptools')
provides=("python3-${_realname}")
replaces=("python3-${_realname}")
conflicts=("python3-${_realname}")
source=("https://pypi.io/packages/source/a/attrs/attrs-$pkgver.tar.gz")
sha512sums=('640532c6b763fd96572e5d85e93c111bebc4c5e0ff9419fe92fb51280f03acb5f9f43339f57d30659e777d5578460675c60ec0a362f9ad433893e3624ce6a931')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  /usr/bin/python setup.py build
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  /usr/bin/python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
